<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>语音转文字</title>
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Noto Sans SC', sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
            min-height: 100vh;
            padding: 20px;
            color: #2c3e50;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
            padding: 30px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
            backdrop-filter: blur(10px);
        }

        h1 {
            text-align: center;
            color: #34495e;
            margin-bottom: 30px;
            font-size: 2em;
            font-weight: 700;
            position: relative;
            padding-bottom: 15px;
        }

        h1::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 4px;
            background: linear-gradient(90deg, #667eea, #764ba2);
            border-radius: 2px;
        }

        #result {
            margin: 20px 0;
            padding: 20px;
            border-radius: 15px;
            background: #ffffff;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
            min-height: 120px;
            transition: all 0.3s ease;
            border: 2px solid #e6e9f0;
            font-size: 1.1em;
            line-height: 1.6;
        }

        #result:empty::before {
            content: '转写结果将显示在这里...';
            color: #94a3b8;
            font-style: italic;
        }

        .loading {
            display: none;
            text-align: center;
            margin: 20px 0;
            padding: 15px;
            border-radius: 12px;
            background: #f8fafc;
            color: #64748b;
        }

        .loading.active {
            display: block;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { opacity: 0.6; }
            50% { opacity: 1; }
            100% { opacity: 0.6; }
        }

        #recordButton {
            position: fixed;
            bottom: 40px;
            right: 40px;
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9em;
            font-weight: 500;
            box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
            transition: all 0.3s ease;
        }

        #recordButton::before {
            content: '🎤';
            font-size: 1.5em;
            margin-right: 2px;
        }

        #recordButton:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
        }

        #recordButton:active {
            background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
            transform: scale(0.95);
        }

        .status-indicator {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background-color: #22c55e;
            box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
        }

        @media (max-width: 768px) {
            .container {
                padding: 20px;
                margin: 10px;
            }

            #recordButton {
                bottom: 30px;
                right: 30px;
                width: 60px;
                height: 60px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="status-indicator"></div>
        <h1>语音转文字</h1>
        <div id="result"></div>
        <div class="loading" id="loading">
            <p>正在处理中...</p>
        </div>
    </div>
    <button id="recordButton" title="按住开始录音"></button>

    <script src="js/app-2.js"></script>
</body>
</html> 